<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta http-equiv="content-Type" content="text/html;charset=utf-8">
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

		<meta name="description" content="个人中心" />
		<title>个人中心</title>
		<link rel="stylesheet" href="css/user-reset.css" />
		<link rel="stylesheet" href="css/user-main.css" />
		<link rel="stylesheet" href="css/user-list.css" />
		<script type="text/javascript" src="js/jquery-3.4.1.js"></script>
		<script type="text/javascript">
			$(function () {
					var body_height = $(document).height();
					$(".main").css("height", body_height + "px")


				$("#orders").empty();
				$.ajax({
					type:"get",
					url:"order/findOrder.do",
					dataType:"json",
					success:function (data){
						$.each(data,function (i,n) {
							$("#orders").append("<div class='section  section2'><div class='margin-right-container-nav margin-right-container-nav2'>"+n.orderid+"</div>" +
									"<div class='margin-right-container-nav margin-right-container-nav2'>张三</div>" +
									"<div class='margin-right-container-nav margin-right-container-nav2'>"+n.price+"</div>" +
									"<div class='margin-right-container-nav margin-right-container-nav2'>"+n.address+"</div>" +
									"<div class='margin-right-container-nav margin-right-container-nav2'>未支付</div>" +
									"<div class='margin-right-container-nav margin-right-container-nav2'>"+n.creationtime+"</div>" +
									"<div class='margin-right-container-nav margin-right-container-nav2'><a onclick=''>订单详细</a></div>" +
									"<div class='margin-right-container-nav margin-right-container-nav2'><a onclick=''>删除</a><a onclick=''>去支付</a></div>" +
									"<div class='clear'></div></div>")
						})
					}
				})
			})
			function tuichu(){
				$.ajax({
					type:"get",
					url:"user/logout.do",
					dataType:"json",
					success:function (data){
						if(data.result==1){
							alert("退出成功");
							location.href="index.html";
						}
					}
				})
			}
		</script>
	</head>
	<!--顾客订单 -->
	<body>
		<!-- 固定 -->
		<div class="main">
			<div class="main-left main-left2">
				<div class="main-left-header">个人中心</div>
				<div class="main-left-nav">

					<div class="main-left-navs main-left-manage navs-active">
						<p class="nav-name" onclick="window.location.href='index.html'">同乡烩首页</p>
						<div class="navs  navs-first" onclick="window.location.href=''">购物车</div>
						<div class="navs" onclick="window.location.href='user-indent.html'">订单</div>
						<div class="navs" onclick="window.location.href='user-data.html'">修改资料</div>
						<div class="navs" onclick="window.location.href='cookdeal.html'">预约信息</div>
						<div class="navs" onclick="tuichu()">退出登录</div>
					</div>





				</div>
			</div>


			<div class="main-left"></div>

			<!-- 操作 -->
			<div class="main-right">
				<div class="main-right-header"></div>
				<div class="main-right-navs">
					<a href="user-index.html">首页</a><a class="split">/</a><a>订单</a>
					<!-- 搜索模块 -->
					
					<div class="search">

						<input type="text" value="" placeholder="请输入关键词">

						<button></button>

					</div>
				</div>


				<div class="margin-right-container">
					<div class="section section1">
						<div class="margin-right-container-nav">订单号</div>
						<div class="margin-right-container-nav">用户名</div>
						<div class="margin-right-container-nav">总金额</div>
						<div class="margin-right-container-nav">收货地址</div>
						<div class="margin-right-container-nav">支付状态</div>
						<div class="margin-right-container-nav">创建时间</div>
						<div class="margin-right-container-nav">订单详情</div>
						<div class="margin-right-container-nav">操作</div>
						<div class="clear"></div>
					</div>

					<div id="orders">
					<div class="section  section2">
						<div class="margin-right-container-nav margin-right-container-nav2">1815259612</div>
						<div class="margin-right-container-nav margin-right-container-nav2">张先生</div>
						<div class="margin-right-container-nav margin-right-container-nav2">1820</div>
						<div class="margin-right-container-nav margin-right-container-nav2">广东省惠州市惠州学院</div>
						<div class="margin-right-container-nav margin-right-container-nav2">已支付</div>
						<div class="margin-right-container-nav margin-right-container-nav2">2020-05-09</div>
						<div class="margin-right-container-nav margin-right-container-nav2"><a onclick=""></a></div>
						<div class="margin-right-container-nav margin-right-container-nav2"><a
								id="remove">删除</a><a id="paid">去支付</a></div>
						<div class="clear"></div>
					</div>
					</div>
					
				</div>

			</div>
			<div class="clear"></div>
		</div>

	</body>
</html>
